package sort;

public class MaoPaoSort {

	public static void main(String[] args) {
		int[] score = {82,83,81,76,92};
		
		/*for (int i = 0; i < score.length-1; i++) {
			for (int j = i; j < score.length-1; j++) {
				if(score[i]<score[j+1]){
					int temp = score[i];
					score[i] = score[j+1];
					score[j+1] = temp;
				}
			}
		}
		
		for (int s : score) {
			System.out.println(s);
		}*/
		
		for(int j = 0; j < score.length-1; j++){
			for (int i = 0; i < score.length-1-j; i++) {
				if(score[i] < score[i+1]){
					int temp = score[i];
					score[i] = score[i+1];
					score[i+1] = temp;
				}
			}
		}
		
		for (int i : score) {
			System.out.println(i);
		}
		
	}

}
